<%= render Polaris::BaseComponent.new(tag: 'nav', **@system_arguments) do %>
  <%= polaris_button_group(**@button_group_arguments) do |group| %>
    <% group.with_item do %>
      <%= polaris_button(url: @previous_url, outline: true, disabled: @previous_url.blank?) do |button| %>
        <% button.with_icon(name: "ChevronLeftIcon") %>
      <% end %>
    <% end %>
    <% if @label.present? %>
      <% group.with_item do %>
        <div aria-live="polite"><%= @label %></div>
      <% end %>
    <% end %>
    <% group.with_item do %>
      <%= polaris_button(url: @next_url, outline: true, disabled: @next_url.blank?) do |button| %>
        <% button.with_icon(name: "ChevronRightIcon") %>
      <% end %>
    <% end %>
  <% end %>
<% end %>
